package com.hamll.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hamll.item.pojo.Item;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;


public interface ItemMapper extends BaseMapper<Item> {
    @Update("update tb_item set stock = stock-#{num} where id=#{itemid}")
    int deductStock(@Param("itemid") Long itemId,@Param("num") Integer num);
}
